package com.zzl.finance.data.constant;

/**
 * 审核状态，0审核中，1审核通过，2审核拒绝
 *
 * @author by gull
 * @date 2020/11/9 12:30
 */
public enum ApproveStatusConstant {


    /**
     *
     */
    APPROVE_STATUS_ING(0, "审核中"),
    APPROVE_STATUS_AGREE(1, "审核通过"),
    APPROVE_STATUS_REFUSE(2, "审核拒绝"),
    ;

    private Integer key;
    private String value;

    ApproveStatusConstant(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public Integer getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValue(Integer code) {
        for (ApproveStatusConstant statusEnum : ApproveStatusConstant.values()) {
            if (statusEnum.key.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }
}
